﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Tapt.Web.admin
{
    public partial class Login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void LogInBitches(object sender, EventArgs e)
        {
            if (FuckinLoginUN.Text == ConfigurationManager.AppSettings["username"] && 
                FuckinLoginPW.Text == ConfigurationManager.AppSettings["password"])
            {
                HttpCookie myCookie = new HttpCookie(ConfigurationManager.AppSettings["AuthCookie"]);
                DateTime now = DateTime.Now;
                myCookie.Value = now.ToString();
                Response.Cookies.Add(myCookie);

                Response.Redirect("~/admin/Default.aspx");
            }
            else
            {
                errorlbl.Visible = true;
            }
        }
    }
}